diff --git a/.agignore b/.agignore
new file mode 100644
index 00000000000..849ddff3b7e
--- /dev/null
+++ b/.agignore
@@ -0,0 +1 @@
+dist/
diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index c406fe770ed..00000000000
--- a/.babelrc
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "presets": [
- "es2015",
- "react",
- "stage-0"
- ],
- "plugins": [
- [
- "module-alias",
- [
- {
- "expose": "components",
- "src": "src/core/components"
- },
- {
- "expose": "core",
- "src": "src/core"
- },
- {
- "expose": "img",
- "src": "src/img"
- },
- {
- "expose": "corePlugins",
- "src": "src/core/plugins"
- },
- {
- "expose": "less",
- "src": "src/less"
- },
- {
- "expose": "base",
- "src": "npm:getbase/src/less/base"
- }
- ]
- ]
- ]
-}
diff --git a/.browserslistrc b/.browserslistrc
new file mode 100644
index 00000000000..611e7a350d1
--- /dev/null
+++ b/.browserslistrc
@@ -0,0 +1,29 @@
+[node-production]
+maintained node versions
+
+[node-development]
+node 22
+
+[browser-production]
+> 1%
+last 2 versions
+Firefox ESR
+not dead
+
+[browser-development]
+last 1 chrome version
+last 1 firefox version
+last 1 safari version
+
+[isomorphic-production]
+> 1%
+last 2 versions
+Firefox ESR
+not dead
+maintained node versions
+
+[isomorphic-development]
+last 1 chrome version
+last 1 firefox version
+last 1 safari version
+node 22
diff --git a/.commitlintrc.json b/.commitlintrc.json
new file mode 100644
index 00000000000..a55865b3848
--- /dev/null
+++ b/.commitlintrc.json
@@ -0,0 +1,25 @@
+{
+ "extends": [
+ "@commitlint/config-conventional"
+ ],
+ "rules": {
+ "header-max-length": [
+ 2,
+ "always",
+ 69
+ ],
+ "scope-case": [
+ 2,
+ "always",
+ [
+ "camel-case",
+ "kebab-case",
+ "upper-case"
+ ]
+ ],
+ "subject-case": [
+ 0,
+ "always"
+ ]
+ }
+}
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000000..47c624e5e21
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,8 @@
+/.git
+/.github
+/dev-helpers
+/docs
+/src
+/swagger-ui-dist-package
+/test
+/node_modules
\ No newline at end of file
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 00000000000..5e20fb04701
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,3 @@
+dist/
+node_modules/
+test/e2e-selenium/
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index de8159ce13f..00000000000
--- a/.eslintrc
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "parser": "babel-eslint",
-
- "env": {
- "browser": true,
- "node": true,
- "es6": true
- },
-
- "parserOptions": {
- "ecmaFeatures": {
- "jsx": true
- }
- },
-
- "extends": ["eslint:recommended", "plugin:react/recommended"],
-
- "plugins": [
- "react"
- ],
-
- "rules": {
- "semi": [2, "never"],
- "strict": 0,
- "quotes": 2,
- "no-unused-vars": 2,
- "no-multi-spaces": 1,
- "camelcase": 1,
- "no-use-before-define": [2,"nofunc"],
- "no-underscore-dangle": 0,
- "no-unused-expressions": 1,
- "comma-dangle": 0,
- "no-console": ["error", { allow: ["warn", "error"] }],
- "react/jsx-no-bind": 1,
- "react/display-name": 0
- }
-}
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 00000000000..87d561e1a66
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,78 @@
+/**
+ * @prettier
+ */
+const path = require("node:path")
+
+module.exports = {
+ parser: "@babel/eslint-parser",
+ env: {
+ browser: true,
+ node: true,
+ es6: true,
+ jest: true,
+ "jest/globals": true,
+ },
+ parserOptions: {
+ ecmaFeatures: { jsx: true },
+ babelOptions: { configFile: path.join(__dirname, "babel.config.js") },
+ },
+ extends: [
+ "eslint:recommended",
+ "plugin:react/recommended",
+ "plugin:prettier/recommended",
+ ],
+ plugins: ["react", "import", "jest", "prettier"],
+ settings: {
+ react: {
+ pragma: "React",
+ version: "15.0",
+ },
+ },
+ rules: {
+ semi: [2, "never"],
+ strict: 0,
+ quotes: [
+ 2,
+ "double",
+ {
+ avoidEscape: true,
+ allowTemplateLiterals: true,
+ },
+ ],
+ "no-unused-vars": 2,
+ "no-multi-spaces": 1,
+ camelcase: [
+ "error",
+ {
+ allow: [
+ "^UNSAFE_",
+ "^requestSnippetGenerator_",
+ "^JsonSchema_",
+ "^curl_",
+ "^dom_",
+ "^api_",
+ "^client_",
+ "^grant_",
+ "^code_",
+ "^redirect_",
+ "^spec",
+ ],
+ },
+ ],
+ "no-use-before-define": [2, "nofunc"],
+ "no-underscore-dangle": 0,
+ "no-unused-expressions": 1,
+ "comma-dangle": 0,
+ "no-console": [
+ 2,
+ {
+ allow: ["warn", "error"],
+ },
+ ],
+ "react/jsx-no-bind": 1,
+ "react/jsx-no-target-blank": 2,
+ "react/display-name": 0,
+ "import/no-extraneous-dependencies": 2,
+ "react/jsx-filename-extension": 2,
+ },
+}
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000000..5e49d7fd6f3
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+docker-run.sh text eol=lf
+/dist/*.map export-ignore
+/test export-ignore
+/docs export-ignore
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
new file mode 100644
index 00000000000..48861bf31c1
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,73 @@
+---
+name: Bug report
+about: Report an issue you're experiencing
+
+---
+
+
+
+### Q&A (please complete the following information)
+ - OS: [e.g. macOS]
+ - Browser: [e.g. chrome, safari]
+ - Version: [e.g. 22]
+ - Method of installation: [e.g. npm, dist assets]
+ - Swagger-UI version: [e.g. 3.10.0]
+ - Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0]
+
+### Content & configuration
+
+
+Example Swagger/OpenAPI definition:
+```yaml
+# your YAML here
+```
+
+Swagger-UI configuration options:
+```js
+SwaggerUI({
+ // your config options here
+})
+```
+
+```
+?yourQueryStringConfig
+```
+
+### Describe the bug you're encountering
+
+
+### To reproduce...
+
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+### Expected behavior
+
+
+### Screenshots
+
+
+### Additional context or thoughts
+
diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md
new file mode 100644
index 00000000000..5b18f43f5c1
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Feature_request.md
@@ -0,0 +1,42 @@
+---
+name: Feature request
+about: Suggest a new feature or enhancement for this project
+
+---
+
+ ### Content & configuration
+
+Swagger/OpenAPI definition:
+ ```yaml
+ # your YAML here
+ ```
+
+ Swagger-UI configuration options:
+ ```js
+ SwaggerUI({
+ // your config options here
+ })
+ ```
+
+ ```
+ ?yourQueryStringConfig
+ ```
+
+
+### Is your feature request related to a problem?
+
+
+### Describe the solution you'd like
+
+
+### Describe alternatives you've considered
+
+
+### Additional context
+
diff --git a/.github/ISSUE_TEMPLATE/Support.md b/.github/ISSUE_TEMPLATE/Support.md
new file mode 100644
index 00000000000..92eb5e905df
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Support.md
@@ -0,0 +1,46 @@
+---
+name: Support
+about: Ask a question or request help with your implementation.
+
+---
+
+
+
+### Q&A (please complete the following information)
+ - OS: [e.g. macOS]
+ - Browser: [e.g. chrome, safari]
+ - Version: [e.g. 22]
+ - Method of installation: [e.g. npm, dist assets]
+ - Swagger-UI version: [e.g. 3.10.0]
+ - Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0]
+
+### Content & configuration
+
+
+Swagger/OpenAPI definition:
+```yaml
+# your YAML here
+```
+
+Swagger-UI configuration options:
+```js
+SwaggerUI({
+ // your config options here
+})
+```
+
+```
+?yourQueryStringConfig
+```
+
+### Screenshots
+
+
+### How can we help?
+
diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
new file mode 100644
index 00000000000..6475663f5e2
--- /dev/null
+++ b/.github/dependabot.yaml
@@ -0,0 +1,35 @@
+version: 2
+updates:
+ - package-ecosystem: npm
+ directory: "/"
+ schedule:
+ interval: daily
+ time: "23:00"
+ commit-message:
+ prefix: "chore"
+ include: "scope"
+ open-pull-requests-limit: 3
+ ignore:
+ # node-fetch must be synced manually
+ - dependency-name: "node-fetch"
+
+ - package-ecosystem: "docker"
+ # Look for a `Dockerfile` in the `root` directory
+ directory: "/"
+ # Check for updates once a week
+ schedule:
+ interval: "weekly"
+ time: "23:00"
+
+ - package-ecosystem: "github-actions"
+ target-branch: "master"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ time: "23:00"
+ commit-message:
+ prefix: "chore"
+ include: "scope"
+ open-pull-requests-limit: 3
+
+
diff --git a/.github/lock.yml b/.github/lock.yml
new file mode 100644
index 00000000000..e0b8c11acca
--- /dev/null
+++ b/.github/lock.yml
@@ -0,0 +1,15 @@
+daysUntilLock: 365
+skipCreatedBefore: 2017-03-29 # initial release of Swagger UI 3.0.0
+exemptLabels: []
+lockLabel: "locked-by: lock-bot"
+setLockReason: false
+only: issues
+lockComment: false
+# lockComment: |
+# Locking due to inactivity.
+
+# This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.
+
+# If you think you're experiencing something similar to what you've found here: please [open a new issue](https://github.com/swagger-api/swagger-ui/issues/new/choose), follow the template, and reference this issue in your report.
+
+# Thanks!
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 00000000000..64e9cf6f849
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,55 @@
+
+
+### Description
+
+
+
+
+### Motivation and Context
+
+
+
+
+
+
+
+### How Has This Been Tested?
+
+
+
+
+
+
+### Screenshots (if appropriate):
+
+
+
+## Checklist
+
+
+
+### My PR contains...
+
+- [ ] No code changes (`src/` is unmodified: changes to documentation, CI, metadata, etc.)
+- [ ] Dependency changes (any modification to dependencies in `package.json`)
+- [ ] Bug fixes (non-breaking change which fixes an issue)
+- [ ] Improvements (misc. changes to existing features)
+- [ ] Features (non-breaking change which adds functionality)
+
+### My changes...
+- [ ] are breaking changes to a public API (config options, System API, major UI change, etc).
+- [ ] are breaking changes to a private API (Redux, component props, utility functions, etc.).
+- [ ] are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
+- [ ] are not breaking changes.
+
+### Documentation
+- [ ] My changes do not require a change to the project documentation.
+- [ ] My changes require a change to the project documentation.
+- [ ] If yes to above: I have updated the documentation accordingly.
+
+### Automated tests
+- [ ] My changes can not or do not need to be tested.
+- [ ] My changes can and should be tested by unit and/or integration tests.
+- [ ] If yes to above: I have added tests to cover my changes.
+- [ ] If yes to above: I have taken care to cover edge cases in my tests.
+- [ ] All new and existing tests passed.
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 00000000000..464ec9ddcb0
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,63 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ "master" ]
+ schedule:
+ - cron: '16 04 * * 2'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'javascript' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+ # Use only 'java' to analyze code written in Java, Kotlin or both
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+ # queries: security-extended,security-and-quality
+ config: |
+ paths-ignore:
+ - 'dist/'
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml
new file mode 100644
index 00000000000..0bdc1bd2d0c
--- /dev/null
+++ b/.github/workflows/dependabot-merge.yml
@@ -0,0 +1,40 @@
+name: Merge me!
+
+on:
+ pull_request_target:
+ branches: [ master, next ]
+
+permissions:
+ contents: read
+
+jobs:
+ merge-me:
+ name: Merge me!
+ if: github.actor == 'dependabot[bot]'
+ runs-on: ubuntu-latest
+ steps:
+ # This first step will fail if there's no metadata and so the approval
+ # will not occur.
+ - name: Dependabot metadata
+ id: dependabot-metadata
+ uses: dependabot/fetch-metadata@v2.4.0
+ with:
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
+ # Here the PR gets approved.
+ - name: Approve a PR
+ if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
+ run: gh pr review --approve "$PR_URL"
+ env:
+ PR_URL: ${{ github.event.pull_request.html_url }}
+ GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
+ # Finally, tell dependabot to merge the PR if all checks are successful
+ - name: Instruct dependabot to squash & merge
+ if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
+ uses: mshick/add-pr-comment@v2
+ with:
+ repo-token: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
+ allow-repeats: true
+ message: |
+ @dependabot squash and merge
+ env:
+ GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
diff --git a/.github/workflows/docker-build-push-unstable.yml b/.github/workflows/docker-build-push-unstable.yml
new file mode 100644
index 00000000000..0bd531ed9d0
--- /dev/null
+++ b/.github/workflows/docker-build-push-unstable.yml
@@ -0,0 +1,52 @@
+name: Build & Push SwaggerUI unstable Docker image
+
+on:
+ workflow_run:
+ workflows: ["Node.js CI"]
+ types:
+ - completed
+ branches: [master]
+
+jobs:
+
+ build-push-unstable:
+ if: github.event.workflow_run.conclusion == 'success'
+ name: Build & Push SwaggerUI unstable Docker image
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Use Node.js 22
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: package-lock.json
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build SwaggerUI
+ run: npm run build
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Log in to DockerHub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKERHUB_SB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_SB_PASSWORD }}
+
+ - name: Build docker image and push
+ uses: docker/build-push-action@v6
+ with:
+ context: .
+ push: true
+ platforms: linux/amd64,linux/arm/v6,linux/arm64,linux/386,linux/ppc64le
+ provenance: false
+ tags: swaggerapi/swagger-ui:unstable
diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml
new file mode 100644
index 00000000000..e22e4c91650
--- /dev/null
+++ b/.github/workflows/docker-build-push.yml
@@ -0,0 +1,77 @@
+name: Build & Push SwaggerUI Docker image
+
+on:
+ workflow_run:
+ workflows: ["Release SwaggerUI"]
+ types:
+ - completed
+ branches: [master]
+
+jobs:
+
+ build-push:
+ if: github.event.workflow_run.conclusion == 'success'
+ name: Build & Push SwaggerUI Docker image
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Use Node.js 22
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: package-lock.json
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build SwaggerUI
+ run: npm run build
+
+ - name: Determine released version
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ run_id: context.payload.workflow_run.id,
+ });
+ const matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
+ return artifact.name == "released-version"
+ })[0];
+ const download = await github.rest.actions.downloadArtifact({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ artifact_id: matchArtifact.id,
+ archive_format: 'zip',
+ });
+ const fs = require('fs');
+ fs.writeFileSync('${{github.workspace}}/released-version.zip', Buffer.from(download.data));
+ - run: |
+ unzip released-version.zip
+ RELEASED_VERSION=$(cat released-version.txt)
+ echo "RELEASED_VERSION=$RELEASED_VERSION" >> $GITHUB_ENV
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Log in to DockerHub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKERHUB_SB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_SB_PASSWORD }}
+
+ - name: Build docker image and push
+ uses: docker/build-push-action@v6
+ with:
+ context: .
+ push: true
+ platforms: linux/amd64,linux/arm/v6,linux/arm64,linux/386,linux/ppc64le
+ provenance: false
+ tags: swaggerapi/swagger-ui:latest,swaggerapi/swagger-ui:v${{ env.RELEASED_VERSION }}
diff --git a/.github/workflows/docker-image-check.yml b/.github/workflows/docker-image-check.yml
new file mode 100644
index 00000000000..dd11960632e
--- /dev/null
+++ b/.github/workflows/docker-image-check.yml
@@ -0,0 +1,23 @@
+name: Security scan for docker image
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '30 4 * * *'
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Run Trivy vulnerability scanner
+ uses: aquasecurity/trivy-action@master
+ with:
+ image-ref: 'docker.swagger.io/swaggerapi/swagger-ui:unstable'
+ format: 'table'
+ exit-code: '1'
+ ignore-unfixed: true
+ vuln-type: 'os,library'
+ severity: 'CRITICAL,HIGH'
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
new file mode 100644
index 00000000000..38604fdf0e5
--- /dev/null
+++ b/.github/workflows/nodejs.yml
@@ -0,0 +1,86 @@
+# 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, next ]
+ pull_request:
+ branches: [ master, next ]
+
+env:
+ CYPRESS_CACHE_FOLDER: cypress/cache
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Use Node.js 20.x
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+
+ - name: Cache Node Modules and Cypress binary
+ uses: actions/cache@v4
+ id: cache-primes
+ with:
+ path: |
+ node_modules
+ ${{ env.CYPRESS_CACHE_FOLDER }}
+ key: ${{ runner.os }}-node-and-cypress-${{ hashFiles('package-lock.json') }}
+
+ - name: Install dependencies
+ if: steps.cache-primes.outputs.cache-hit != 'true'
+ run: npm ci
+
+ - name: Lint code for errors only
+ run: npm run lint-errors
+
+ - name: Run all tests
+ run: npm run test:unit
+ env:
+ CI: true
+
+ - name: Build SwaggerUI
+ run: npm run build
+
+ - name: Test build artifacts
+ run: npm run test:artifact
+
+ e2e-tests:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ containers: ['+(a11y|security|bugs)/**/*cy.js', 'features/**/+(o|d)*.cy.js', 'features/**/m*.cy.js', 'features/**/!(o|d|m)*.cy.js']
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Use Node.js 20.x
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+
+ - name: Cache Node Modules and Cypress binary
+ uses: actions/cache@v4
+ id: cache-primes
+ with:
+ path: |
+ node_modules
+ ${{ env.CYPRESS_CACHE_FOLDER }}
+ key: ${{ runner.os }}-node-and-cypress-${{ hashFiles('package-lock.json') }}
+
+ - name: Install dependencies
+ if: steps.cache-primes.outputs.cache-hit != 'true'
+ run: npm ci
+
+ - name: Cypress Test
+ run: npx start-server-and-test cy:start http://localhost:3204 'npm run cy:run -- --spec "test/e2e-cypress/e2e/${{ matrix.containers }}"'
diff --git a/.github/workflows/release-swagger-ui-dist.yml b/.github/workflows/release-swagger-ui-dist.yml
new file mode 100644
index 00000000000..d0f2f4627bd
--- /dev/null
+++ b/.github/workflows/release-swagger-ui-dist.yml
@@ -0,0 +1,61 @@
+name: Release SwaggerUI Dist
+
+on:
+ workflow_run:
+ workflows: ["Release SwaggerUI"]
+ types:
+ - completed
+ branches: [ master ]
+
+jobs:
+ release-swagger-ui-dist:
+ if: github.event.workflow_run.conclusion == 'success'
+ name: Release swagger-ui-dist npm package
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ ref: master
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: package-lock.json
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Download build artifact
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ run_id: context.payload.workflow_run.id,
+ });
+ const matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
+ return artifact.name == "dist"
+ })[0];
+ const download = await github.rest.actions.downloadArtifact({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ artifact_id: matchArtifact.id,
+ archive_format: 'zip',
+ });
+ const fs = require('fs');
+ fs.writeFileSync('${{github.workspace}}/dist.zip', Buffer.from(download.data));
+ - run: |
+ unzip -o dist.zip -d dist
+
+ - name: Publish to npmjs.com
+ run: ./deploy.sh
+ working-directory: ./swagger-ui-dist-package
+ env:
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ PUBLISH_DIST: true
diff --git a/.github/workflows/release-swagger-ui-packagist.yml b/.github/workflows/release-swagger-ui-packagist.yml
new file mode 100644
index 00000000000..05d51750dcd
--- /dev/null
+++ b/.github/workflows/release-swagger-ui-packagist.yml
@@ -0,0 +1,21 @@
+name: Release SwaggerUI to Packagist
+
+on:
+ workflow_run:
+ workflows: ["Release SwaggerUI"]
+ types:
+ - completed
+ branches: [ master ]
+
+jobs:
+ release-swagger-ui-packagist:
+ if: github.event.workflow_run.conclusion == 'success'
+ name: Release swagger-ui to packagist
+ runs-on: ubuntu-latest
+ steps:
+ - name: Update SwaggerUI packagist package
+ run: |
+ curl --fail -X POST \
+ -H "Content-Type: application/json" \
+ "https://packagist.org/api/update-package?username=${{ secrets.PACKAGIST_USER }}&apiToken=${{ secrets.PACKAGIST_API_TOKEN }}" \
+ -d "{\"repository\":{\"url\":\"https://packagist.org/packages/swagger-api/swagger-ui\"}}"
diff --git a/.github/workflows/release-swagger-ui-react.yml b/.github/workflows/release-swagger-ui-react.yml
new file mode 100644
index 00000000000..386fddcc037
--- /dev/null
+++ b/.github/workflows/release-swagger-ui-react.yml
@@ -0,0 +1,61 @@
+name: Release SwaggerUI React
+
+on:
+ workflow_run:
+ workflows: ["Release SwaggerUI"]
+ types:
+ - completed
+ branches: [ master ]
+
+jobs:
+ release-swagger-ui-react:
+ if: github.event.workflow_run.conclusion == 'success'
+ name: Release swagger-ui-react npm package
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ ref: master
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: package-lock.json
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Download build artifact
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ run_id: context.payload.workflow_run.id,
+ });
+ const matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
+ return artifact.name == "dist"
+ })[0];
+ const download = await github.rest.actions.downloadArtifact({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ artifact_id: matchArtifact.id,
+ archive_format: 'zip',
+ });
+ const fs = require('fs');
+ fs.writeFileSync('${{github.workspace}}/dist.zip', Buffer.from(download.data));
+ - run: |
+ unzip -o dist.zip -d dist
+
+ - name: Publish to npmjs.com
+ run: ./run.sh
+ working-directory: ./flavors/swagger-ui-react/release
+ env:
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ PUBLISH_FLAVOR_REACT: true
diff --git a/.github/workflows/release-swagger-ui.yml b/.github/workflows/release-swagger-ui.yml
new file mode 100644
index 00000000000..54308341f5a
--- /dev/null
+++ b/.github/workflows/release-swagger-ui.yml
@@ -0,0 +1,95 @@
+name: Release SwaggerUI
+on:
+ workflow_dispatch:
+ branches:
+ - master
+
+jobs:
+ release:
+ name: Release swagger-ui npm package
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ ref: master
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: package-lock.json
+
+ - name: Determine the next release version
+ uses: cycjimmy/semantic-release-action@v4
+ with:
+ dry_run: true
+ extra_plugins: |
+ @semantic-release/git
+ @semantic-release/exec
+ env:
+ GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ - name: Nothing to release
+ if: ${{ env.NEXT_RELEASE_VERSION == '' }}
+ uses: actions/github-script@v7
+ with:
+ script: |
+ core.setFailed('Nothing to release')
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Prepare for the Release
+ env:
+ REACT_APP_VERSION: ${{ env.NEXT_RELEASE_VERSION }}
+ run: |
+ npm run test
+ npm run build
+
+ - name: Semantic Release
+ id: semantic
+ uses: cycjimmy/semantic-release-action@v4
+ with:
+ dry_run: false
+ extra_plugins: |
+ @semantic-release/git
+ env:
+ GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ - name: Release failed
+ if: steps.semantic.outputs.new_release_published == 'false'
+ uses: actions/github-script@v7
+ with:
+ script: |
+ core.setFailed('Release failed')
+
+ - name: Release published
+ run: |
+ echo ${{ steps.semantic.outputs.new_release_version }}
+ echo ${{ steps.semantic.outputs.new_release_major_version }}
+ echo ${{ steps.semantic.outputs.new_release_minor_version }}
+ echo ${{ steps.semantic.outputs.new_release_patch_version }}
+
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: dist
+ path: ./dist
+
+
+ - name: Prepare released version for uploading
+ shell: bash
+ run: |
+ echo ${{ steps.semantic.outputs.new_release_version }} > released-version.txt
+ - name: Upload released version
+ uses: actions/upload-artifact@v4
+ with:
+ name: released-version
+ path: ./released-version.txt
+ retention-days: 1
diff --git a/.gitignore b/.gitignore
index 3930fdf411d..e957857575d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,29 @@
node_modules
.idea
+.vscode
.deps_check
.DS_Store
-npm-debug.log
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+.nyc_output
+npm-debug.log*
.eslintcache
+*.iml
+selenium-debug.log
+chromedriver.log
+test/e2e/db.json
+docs/_book
+dev-helpers/examples
+
+# dist
+flavors/**/dist/*
+/lib
+/es
+dist/log*
+/swagger-ui-*.tgz
+
+# Cypress
+test/e2e-cypress/screenshots
+test/e2e-cypress/videos
diff --git a/.husky/commit-msg b/.husky/commit-msg
new file mode 100755
index 00000000000..951570f79b7
--- /dev/null
+++ b/.husky/commit-msg
@@ -0,0 +1 @@
+npx commitlint -e
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100755
index 00000000000..2312dc587f6
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1 @@
+npx lint-staged
diff --git a/.lintstagedrc b/.lintstagedrc
new file mode 100644
index 00000000000..0b1dd617c67
--- /dev/null
+++ b/.lintstagedrc
@@ -0,0 +1,4 @@
+{
+ "*.{js,jsx}": ["eslint --max-warnings 0"],
+ "*.scss": ["stylelint '**/*.scss'"]
+}
diff --git a/.npmignore b/.npmignore
index a5d409570c0..59950fe3b9e 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,8 +1,15 @@
*
*/
!README.md
+!NOTICE
!package.json
!dist/swagger-ui.js
!dist/swagger-ui.js.map
+!dist/swagger-ui-bundle.js
+!dist/swagger-ui-standalone-preset.js
+!dist/swagger-ui-es-bundle.js
+!dist/swagger-ui-es-bundle-core.js
+!dist/swagger-ui-es-bundle-core.js.map
!dist/swagger-ui.css
!dist/swagger-ui.css.map
+!dist/oauth2-redirect.html
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 00000000000..d508edc4142
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+save-prefix="="
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 00000000000..7af24b7ddbd
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+22.11.0
diff --git a/.prettierrc.yaml b/.prettierrc.yaml
new file mode 100644
index 00000000000..2e34d757e07
--- /dev/null
+++ b/.prettierrc.yaml
@@ -0,0 +1,5 @@
+semi: false
+trailingComma: es5
+endOfLine: lf
+requirePragma: true
+insertPragma: true
diff --git a/.releaserc b/.releaserc
new file mode 100644
index 00000000000..42f810ba235
--- /dev/null
+++ b/.releaserc
@@ -0,0 +1,25 @@
+{
+ "branches": [
+ {"name": "master"}
+ ],
+ "tagFormat": "v${version}",
+ "plugins": [
+ "@semantic-release/commit-analyzer",
+ [
+ "@semantic-release/exec",
+ {
+ "verifyReleaseCmd": "echo \"NEXT_RELEASE_VERSION=${nextRelease.version}\" >> $GITHUB_ENV"
+ }
+ ],
+ "@semantic-release/release-notes-generator",
+ "@semantic-release/npm",
+ "@semantic-release/github",
+ ["@semantic-release/git", {
+ "assets": [
+ "package.json",
+ "package-lock.json"
+ ],
+ "message": "chore(release): cut the ${nextRelease.version} release\n\n${nextRelease.notes}"
+ }]
+ ]
+}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 3b5085401db..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-language: node_js
-node_js:
-- '6.9'
-services:
- - docker
-branches:
- only:
- - master
- - /^v\d+\.\d+(\.\d+)?(-\S*)?$/
-before_deploy: "npm run build-core"
-env:
- - DOCKER_IMAGE_NAME=swaggerapi/swagger-ui
-deploy:
- provider: npm
- email: apiteam@swagger.io
- skip_cleanup: true
- api_key:
- secure: "IJkLaACa+rfERf1O5nwlqOyuo9sbul3FBhBt4Un9P+DvEet3AoDPV9NQVLd8SkmQYKGbGQWF4BIdjrO5nqFD6Te+JTeUX5Uo/DFS/fu9qw1xv0dQpvbJFuoYnnFlbzGTEs4CFa8lbu3ZromFHQGOQxRobjsG1Kf0dWFSSzmND3g="
- on:
- tags: true
- repo: swagger-api/swagger-ui
- node: '6.9'
-after_success:
- - if [ $DOCKER_HUB_USERNAME ]; then
- docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD;
- docker build -t $DOCKER_IMAGE_NAME .;
- if [ "$TRAVIS_TAG" != "master" && -z "$TRAVIS_TAG"]; then
- docker tag $DOCKER_IMAGE_NAME $DOCKER_IMAGE_NAME:$TRAVIS_TAG;
- fi;
-
- docker push $DOCKER_IMAGE_NAME;
- fi;
diff --git a/Dockerfile b/Dockerfile
index b6172247768..e4679a157dd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,16 +1,37 @@
-FROM alpine:3.4
+# Looking for information on environment variables?
+# We don't declare them here — take a look at our docs.
+# https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md
-MAINTAINER fehguy
+FROM nginx:1.27.5-alpine
-RUN apk add --update nginx
-RUN mkdir -p /run/nginx
+LABEL maintainer="vladimir.gorej@gmail.com" \
+ org.opencontainers.image.authors="vladimir.gorej@gmail.com" \
+ org.opencontainers.image.url="docker.swagger.io/swaggerapi/swagger-ui" \
+ org.opencontainers.image.source="https://github.com/swagger-api/swagger-ui" \
+ org.opencontainers.image.description="SwaggerUI Docker image" \
+ org.opencontainers.image.licenses="Apache-2.0"
-COPY nginx.conf /etc/nginx/
+RUN apk add --update-cache --no-cache "nodejs" "libxml2>=2.13.4-r6" "libexpat>=2.7.0-r0" "libxslt>=1.1.42-r2" "xz-libs>=5.6.3-r1" "c-ares>=1.34.5-r0"
-# copy swagger files to the `/js` folder
-ADD ./public/* /usr/share/nginx/html/
-ADD ./dist/* /usr/share/nginx/html/
+LABEL maintainer="char0n"
-EXPOSE 8080
+ENV API_KEY="**None**" \
+ SWAGGER_JSON="/app/swagger.json" \
+ PORT="8080" \
+ PORT_IPV6="" \
+ BASE_URL="/" \
+ SWAGGER_JSON_URL="" \
+ CORS="true" \
+ EMBEDDING="false"
+
+COPY --chown=nginx:nginx --chmod=0666 ./docker/default.conf.template ./docker/cors.conf ./docker/embedding.conf /etc/nginx/templates/
+
+COPY --chmod=0666 ./dist/* /usr/share/nginx/html/
+COPY --chmod=0555 ./docker/docker-entrypoint.d/ /docker-entrypoint.d/
+COPY --chmod=0666 ./docker/configurator /usr/share/nginx/configurator
-CMD exec nginx -g 'daemon off;'
+# Simulates running NGINX as a non root; in future we want to use nginxinc/nginx-unprivileged.
+# In future we will have separate unpriviledged images tagged as v5.1.2-unprivileged.
+RUN chmod 777 /usr/share/nginx/html/ /etc/nginx/conf.d/ /etc/nginx/conf.d/default.conf /var/cache/nginx/ /var/run/
+
+EXPOSE 8080
diff --git a/LICENSE b/LICENSE
index 252389a1a98..d6456956733 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,11 +1,202 @@
-Copyright 2017 SmartBear Software
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 00000000000..ab788a27d5b
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,2 @@
+swagger-ui
+Copyright 2020-2021 SmartBear Software Inc.
diff --git a/README.md b/README.md
index 5c21db4a748..80bca1690ee 100644
--- a/README.md
+++ b/README.md
@@ -1,134 +1,117 @@
-# Swagger UI
+#
[](http://badge.fury.io/js/swagger-ui)
+[](https://jenkins.swagger.io/view/OSS%20-%20JavaScript/job/oss-swagger-ui-master/)
+[](https://jenkins.swagger.io/job/oss-swagger-ui-security-audit/lastBuild/console)
+[](https://github.com/swagger-api/swagger-ui/graphs/contributors)
-## New!
+[](https://www.npmjs.com/package/swagger-ui)
+
+
+[](https://bundlephobia.com/package/swagger-ui)
-**This is the new version of swagger-ui, 3.x. Want to learn more? Check out our [FAQ](http://swagger.io/new-ui-faq/).**
+## Introduction
+[Swagger UI](https://swagger.io/tools/swagger-ui/) allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your OpenAPI (formerly known as Swagger) Specification, with the visual documentation making it easy for back end implementation and client side consumption.
-As a brand new version, written from the ground up, there are some known issues and unimplemented features. Check out the [Known Issues](#known-issues) section for more details.
+## General
+**👉🏼 Want to score an easy open-source contribution?** Check out our [Good first issue](https://github.com/swagger-api/swagger-ui/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%22) label.
-For the older version of swagger-ui, refer to the [*2.x branch*](https://github.com/swagger-api/swagger-ui/tree/2.x).
+**🕰️ Looking for the older version of Swagger UI?** Refer to the [*2.x* branch](https://github.com/swagger-api/swagger-ui/tree/2.x).
-## Compatibility
-The OpenAPI Specification has undergone 4 revisions since initial creation in 2010. Compatibility between swagger-ui and the OpenAPI Specification is as follows:
-
-Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status
------------------- | ------------ | -------------------------- | ----- | ------
-3.0.3 | 2017-03-19 | 2.0 | [tag v3.0.3](https://github.com/swagger-api/swagger-ui/tree/v3.0.3) |
-2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) |
-2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
-2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
-1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
-1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
-
-
-### How to run
-
-##### Easy start! Docker
-You can pull a pre-built docker image of the swagger-ui directly from Dockerhub:
-
-```
-docker pull swaggerapi/swagger-ui
-docker run -p 80:8080 swaggerapi/swagger-ui
-```
-
-Will start nginx with swagger-ui on port 80.
-
-##### Prerequisites
-- Node 6.x
-- NPM 3.x
-If you just want to see your specs, open `public/index.html` in your browser directly from your filesystem.
+This repository publishes three different NPM modules:
-If you'd like to make modifications to the codebase, run the dev server with: `npm run dev`.
+* [swagger-ui](https://www.npmjs.com/package/swagger-ui) is a traditional npm module intended for use in single-page applications that are capable of resolving dependencies (via Webpack, Browserify, etc.).
+* [swagger-ui-dist](https://www.npmjs.com/package/swagger-ui-dist) is a dependency-free module that includes everything you need to serve Swagger UI in a server-side project, or a single-page application that can't resolve npm module dependencies.
+* [swagger-ui-react](https://www.npmjs.com/package/swagger-ui-react) is Swagger UI packaged as a React component for use in React applications.
-##### Browser support
-Swagger UI works in the latest versions of Chrome, Safari, Firefox, Edge and IE11.
-
-### Known Issues
-
-To help with the migration, here are the currently known issues with 3.X. This list will update regularly, and will not include features that were not implemented in previous versions.
-
-- Currently, the only configuration options available are the `url` and `spec`.
-- The JSON Form Editor is not implemented.
-- Shebang URL support for operations is missing.
-- Support for `collectionFormat` is partial.
-- l10n (translations) is not implemented.
-- Relative path support for external files is not implemented.
+We strongly suggest that you use `swagger-ui` instead of `swagger-ui-dist` if you're building a single-page application, since `swagger-ui-dist` is significantly larger.
+If you are looking for plain ol' HTML/JS/CSS, [download the latest release](https://github.com/swagger-api/swagger-ui/releases/latest) and copy the contents of the `/dist` folder to your server.
-## CORS Support
-CORS is a technique to prevent websites from doing bad things with your personal data. Most browsers + JavaScript toolkits not only support CORS but enforce it, which has implications for your API server which supports Swagger.
+## Compatibility
+The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows:
-You can read about CORS here: http://www.w3.org/TR/cors.
+| Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes |
+|--------------------|--------------|------------------------------------------------------|-----------------------------------------------------------------------|
+| 5.19.0 | 2025-02-17 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1 | [tag v5.19.0](https://github.com/swagger-api/swagger-ui/tree/v5.19.0) |
+| 5.0.0 | 2023-06-12 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0 | [tag v5.0.0](https://github.com/swagger-api/swagger-ui/tree/v5.0.0) |
+| 4.0.0 | 2021-11-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0) |
+| 3.18.3 | 2018-08-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3) |
+| 3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21) |
+| 2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) |
+| 2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
+| 2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
+| 1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
+| 1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
-There are two cases where no action is needed for CORS support:
+## Anonymized analytics
-1. swagger-ui is hosted on the same server as the application itself (same host *and* port).
-2. The application is located behind a proxy that enables the required CORS headers. This may already be covered within your organization.
+SwaggerUI uses [Scarf](https://scarf.sh/) to collect [anonymized installation analytics](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-what-information-does-scarf-js-send-about-me). These analytics help support the maintainers of this library and ONLY run during installation. To [opt out](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-how-can-i-opt-out-of-analytics), you can set the `scarfSettings.enabled` field to `false` in your project's `package.json`:
-Otherwise, CORS support needs to be enabled for:
+```
+// package.json
+{
+ // ...
+ "scarfSettings": {
+ "enabled": false
+ }
+ // ...
+}
+```
-1. Your Swagger docs. For Swagger 2.0 it's the `swagger.json`/`swagger.yaml` and any externally `$ref`ed docs.
-2. For the `Try it now` button to work, CORS needs to be enabled on your API endpoints as well.
+Alternatively, you can set the environment variable `SCARF_ANALYTICS` to `false` as part of the environment that installs your npm packages, e.g., `SCARF_ANALYTICS=false npm install`.
-### Testing CORS Support
+## Documentation
-You can verify CORS support with one of three techniques:
+#### Usage
+- [Installation](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/installation.md)
+- [Configuration](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/configuration.md)
+- [CORS](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/cors.md)
+- [OAuth2](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/oauth2.md)
+- [Deep Linking](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/deep-linking.md)
+- [Limitations](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/limitations.md)
+- [Version detection](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/version-detection.md)
-- Curl your API and inspect the headers. For instance:
+#### Customization
+- [Overview](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/customization/overview.md)
+- [Plugin API](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/customization/plugin-api.md)
+- [Custom layout](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/customization/custom-layout.md)
-```bash
-$ curl -I "http://petstore.swagger.io/v2/swagger.json"
-HTTP/1.1 200 OK
-Date: Sat, 31 Jan 2015 23:05:44 GMT
-Access-Control-Allow-Origin: *
-Access-Control-Allow-Methods: GET, POST, DELETE, PUT, PATCH, OPTIONS
-Access-Control-Allow-Headers: Content-Type, api_key, Authorization
-Content-Type: application/json
-Content-Length: 0
-```
+#### Development
+- [Setting up](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/development/setting-up.md)
+- [Scripts](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/development/scripts.md)
-This tells us that the petstore resource listing supports OPTIONS, and the following headers: `Content-Type`, `api_key`, `Authorization`.
+#### Contributing
+- [Contributing](https://github.com/swagger-api/.github/blob/HEAD/CONTRIBUTING.md)
-- Try swagger-ui from your file system and look at the debug console. If CORS is not enabled, you'll see something like this:
+##### Integration Tests
-```
-XMLHttpRequest cannot load http://sad.server.com/v2/api-docs. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
-```
-
-Swagger-UI cannot easily show this error state.
+You will need JDK of version 7 or higher as instructed here
+https://nightwatchjs.org/guide/getting-started/installation.html#install-selenium-server
-- Using the http://www.test-cors.org website. Keep in mind this will show a successful result even if `Access-Control-Allow-Headers` is not available, which is still required for Swagger-UI to function properly.
+Integration tests can be run locally with `npm run e2e` - be sure you aren't running a dev server when testing!
-### Enabling CORS
+### Browser support
+Swagger UI works in the latest versions of Chrome, Safari, Firefox, and Edge.
-The method of enabling CORS depends on the server and/or framework you use to host your application. http://enable-cors.org provides information on how to enable CORS in some common web servers.
-
-Other servers/frameworks may provide you information on how to enable it specifically in their use case.
+### Known Issues
-### CORS and Header Parameters
+To help with the migration, here are the currently known issues with 3.X. This list will update regularly, and will not include features that were not implemented in previous versions.
-Swagger lets you easily send headers as parameters to requests. The name of these headers *MUST* be supported in your CORS configuration as well. From our example above:
+- Only part of the parameters previously supported are available.
+- The JSON Form Editor is not implemented.
+- Support for `collectionFormat` is partial.
+- l10n (translations) is not implemented.
+- Relative path support for external files is not implemented.
-```
-Access-Control-Allow-Headers: Content-Type, api_key, Authorization
-```
+## Security contact
-Only headers with these names will be allowed to be sent by Swagger-UI.
+Please disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.
## License
-Copyright 2017 SmartBear Software
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+SwaggerUI is licensed under [Apache 2.0 license](https://github.com/swagger-api/swagger-ui/blob/master/LICENSE).
+SwaggerUI comes with an explicit [NOTICE](https://github.com/swagger-api/swagger-ui/blob/master/NOTICE) file
+containing additional legal notices and information.
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000000..6c1d117200c
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,23 @@
+# Security Policy
+
+If you believe you've found an exploitable security issue in Swagger UI,
+**please don't create a public issue**.
+
+
+## Supported versions
+
+This is the list of versions of `swagger-ui` which are
+currently being supported with security updates.
+
+| Version | Supported | Notes |
+|---------|--------------------|---------------------------------|
+| 5.x | :white_check_mark: | Active LTS |
+| 4.x | :x: | End-of-life as of August 2023 |
+| 3.x | :x: | End-of-life as of November 2021 |
+| 2.x | :x: | End-of-life as of 2017 |
+
+## Reporting a vulnerability
+
+To report a vulnerability please send an email with the details to [security@swagger.io](mailto:security@swagger.io).
+
+We'll acknowledge receipt of your report ASAP, and set expectations on how we plan to handle it.
diff --git a/babel.config.js b/babel.config.js
new file mode 100644
index 00000000000..d071bdecba8
--- /dev/null
+++ b/babel.config.js
@@ -0,0 +1,140 @@
+const browser = {
+ presets: [
+ [
+ "@babel/preset-env",
+ {
+ debug: false,
+ modules: "auto",
+ useBuiltIns: false,
+ forceAllTransforms: false,
+ ignoreBrowserslistConfig: false,
+ }
+ ],
+ "@babel/preset-react",
+ ],
+ plugins: [
+ [
+ "@babel/plugin-transform-runtime",
+ {
+ corejs: { version: 3, proposals: false },
+ absoluteRuntime: false,
+ helpers: true,
+ regenerator: false,
+ version: "^7.22.11",
+ }
+ ],
+ [
+ "transform-react-remove-prop-types",
+ {
+ additionalLibraries: [
+ "react-immutable-proptypes"
+ ]
+ }
+ ],
+ [
+ "babel-plugin-module-resolver",
+ {
+ alias: {
+ root: ".",
+ core: "./src/core",
+ }
+ }
+ ]
+ ],
+}
+
+module.exports = {
+ env: {
+ commonjs: {
+ presets: [
+ [
+ "@babel/preset-env",
+ {
+ debug: false,
+ modules: "commonjs",
+ loose: true,
+ useBuiltIns: false,
+ forceAllTransforms: false,
+ ignoreBrowserslistConfig: false,
+ }
+ ],
+ "@babel/preset-react",
+ ],
+ plugins: [
+ [
+ "@babel/plugin-transform-runtime",
+ {
+ corejs: { version: 3, proposals: false },
+ absoluteRuntime: false,
+ helpers: true,
+ regenerator: false,
+ version: "^7.22.11",
+ }
+ ],
+ [
+ "transform-react-remove-prop-types",
+ {
+ additionalLibraries: [
+ "react-immutable-proptypes"
+ ]
+ }
+ ],
+ [
+ "babel-plugin-module-resolver",
+ {
+ alias: {
+ root: ".",
+ core: "./src/core",
+ }
+ }
+ ]
+ ],
+ },
+ esm: {
+ presets: [
+ [
+ "@babel/env",
+ {
+ debug: false,
+ modules: false,
+ ignoreBrowserslistConfig: false,
+ useBuiltIns: false,
+ }
+ ],
+ "@babel/preset-react"
+ ],
+ plugins: [
+ [
+ "@babel/plugin-transform-runtime",
+ {
+ corejs: { version: 3, proposals: false },
+ absoluteRuntime: false,
+ helpers: true,
+ regenerator: false,
+ version: "^7.22.11",
+ }
+ ],
+ [
+ "transform-react-remove-prop-types",
+ {
+ additionalLibraries: [
+ "react-immutable-proptypes"
+ ]
+ }
+ ],
+ [
+ "babel-plugin-module-resolver",
+ {
+ alias: {
+ root: ".",
+ core: "./src/core",
+ }
+ }
+ ]
+ ]
+ },
+ development: browser,
+ production: browser,
+ },
+}
+
diff --git a/build-tools/loadersByExtension.js b/build-tools/loadersByExtension.js
deleted file mode 100644
index 3ae68339377..00000000000
--- a/build-tools/loadersByExtension.js
+++ /dev/null
@@ -1,28 +0,0 @@
-function extsToRegExp(exts) {
- return new RegExp("\\.(" + exts.map(function(ext) {
- return ext.replace(/\./g, "\\.");
- }).join("|") + ")(\\?.*)?$");
-}
-
-module.exports = function loadersByExtension(obj) {
- var loaders = [];
- Object.keys(obj).forEach(function(key) {
- var exts = key.split("|");
- var value = obj[key];
- var entry = {
- extensions: exts,
- test: extsToRegExp(exts)
- };
- if(Array.isArray(value)) {
- entry.loaders = value;
- } else if(typeof value === "string") {
- entry.loader = value;
- } else {
- Object.keys(value).forEach(function(valueKey) {
- entry[valueKey] = value[valueKey];
- });
- }
- loaders.push(entry);
- });
- return loaders;
-};
diff --git a/composer.json b/composer.json
new file mode 100644
index 00000000000..76288f67183
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,40 @@
+{
+ "name": "swagger-api/swagger-ui",
+ "description": " Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.",
+ "keywords": [
+ "Swagger",
+ "OpenAPI",
+ "specification",
+ "documentation",
+ "API",
+ "UI"
+ ],
+ "homepage": "http://swagger.io",
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "Anna Bodnia",
+ "email": "anna.bodnia@gmail.com"
+ },
+ {
+ "name": "Buu Nguyen",
+ "email": "buunguyen@gmail.com"
+ },
+ {
+ "name": "Josh Ponelat",
+ "email": "jponelat@gmail.com"
+ },
+ {
+ "name": "Kyle Shockey",
+ "email": "kyleshockey1@gmail.com"
+ },
+ {
+ "name": "Robert Barnwell",
+ "email": "robert@robertismy.name"
+ },
+ {
+ "name": "Sahar Jafari",
+ "email": "shr.jafari@gmail.com"
+ }
+ ]
+}
diff --git a/config/.eslintrc b/config/.eslintrc
new file mode 100644
index 00000000000..85ec7022bb9
--- /dev/null
+++ b/config/.eslintrc
@@ -0,0 +1,8 @@
+{
+ "rules": {
+ "import/no-unresolved": 0,
+ "import/extensions": 0,
+ "quotes": ["error", "single"],
+ "semi": ["error", "always"]
+ }
+}
diff --git a/config/jest/jest.artifact.config.js b/config/jest/jest.artifact.config.js
new file mode 100644
index 00000000000..47db45f3943
--- /dev/null
+++ b/config/jest/jest.artifact.config.js
@@ -0,0 +1,9 @@
+const path = require('path');
+
+module.exports = {
+ rootDir: path.join(__dirname, '..', '..'),
+ testEnvironment: 'jsdom',
+ testMatch: ['**/test/build-artifacts/**/*.js'],
+ setupFiles: ['/test/unit/jest-shim.js'],
+ transformIgnorePatterns: ['/node_modules/(?!(swagger-client|react-syntax-highlighter)/)'],
+};
diff --git a/config/jest/jest.unit.config.js b/config/jest/jest.unit.config.js
new file mode 100644
index 00000000000..ec71bb6bdaa
--- /dev/null
+++ b/config/jest/jest.unit.config.js
@@ -0,0 +1,23 @@
+const path = require('path');
+
+module.exports = {
+ rootDir: path.join(__dirname, '..', '..'),
+ testEnvironment: 'jest-environment-jsdom',
+ testMatch: [
+ '**/test/unit/*.js?(x)',
+ '**/test/unit/**/*.js?(x)',
+ ],
+ setupFiles: ['/test/unit/jest-shim.js'],
+ setupFilesAfterEnv: ['/test/unit/setup.js'],
+ testPathIgnorePatterns: [
+ '/node_modules/',
+ '/test/build-artifacts/',
+ '/test/unit/jest-shim.js',
+ '/test/unit/setup.js',
+ ],
+ moduleNameMapper: {
+ '^.+\\.svg$': 'jest-transform-stub'
+ },
+ transformIgnorePatterns: ['/node_modules/(?!(sinon|react-syntax-highlighter|@asamuzakjp/css-color)/)'],
+ silent: true, // set to `false` to allow console.* calls to be printed
+};
diff --git a/cypress.config.js b/cypress.config.js
new file mode 100644
index 00000000000..a948ea0f97b
--- /dev/null
+++ b/cypress.config.js
@@ -0,0 +1,19 @@
+const { defineConfig } = require("cypress")
+
+const startOAuthServer = require("./test/e2e-cypress/support/helpers/oauth2-server")
+
+module.exports = defineConfig({
+ fileServerFolder: "test/e2e-cypress/static",
+ fixturesFolder: "test/e2e-cypress/fixtures",
+ screenshotsFolder: "test/e2e-cypress/screenshots",
+ videosFolder: "test/e2e-cypress/videos",
+ video: false,
+ e2e: {
+ baseUrl: "http://localhost:3230/",
+ supportFile: "test/e2e-cypress/support/e2e.js",
+ specPattern: "test/e2e-cypress/e2e/**/*.cy.{js,jsx}",
+ setupNodeEvents: () => {
+ startOAuthServer()
+ },
+ },
+})
diff --git a/dev-helpers/dev-helper-initializer.js b/dev-helpers/dev-helper-initializer.js
new file mode 100644
index 00000000000..ec330dc6249
--- /dev/null
+++ b/dev-helpers/dev-helper-initializer.js
@@ -0,0 +1,33 @@
+/* eslint-disable no-undef */
+window.onload = function() {
+ window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
+ window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
+ // Build a system
+ const ui = SwaggerUIBundle({
+ url: "https://petstore.swagger.io/v2/swagger.json",
+ dom_id: "#swagger-ui",
+ presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIStandalonePreset
+ ],
+ plugins: [
+ SwaggerUIBundle.plugins.DownloadUrl
+ ],
+ // requestSnippetsEnabled: true,
+ layout: "StandaloneLayout"
+ })
+
+ window.ui = ui
+
+ ui.initOAuth({
+ clientId: "your-client-id",
+ clientSecret: "your-client-secret-if-required",
+ realm: "your-realms",
+ appName: "your-app-name",
+ scopeSeparator: " ",
+ scopes: "openid profile email phone address",
+ additionalQueryStringParams: {},
+ useBasicAuthenticationWithAccessCodeGrant: false,
+ usePkceWithAuthorizationCodeGrant: false
+ })
+}
diff --git a/dev-helpers/index.html b/dev-helpers/index.html
new file mode 100644
index 00000000000..9432ef74ad0
--- /dev/null
+++ b/dev-helpers/index.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ Swagger UI
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev-helpers/oauth2-redirect.html b/dev-helpers/oauth2-redirect.html
new file mode 100644
index 00000000000..87a2eed8f5e
--- /dev/null
+++ b/dev-helpers/oauth2-redirect.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
diff --git a/dev-helpers/style.css b/dev-helpers/style.css
new file mode 100644
index 00000000000..75a5daacdb1
--- /dev/null
+++ b/dev-helpers/style.css
@@ -0,0 +1,19 @@
+html
+{
+ box-sizing: border-box;
+ overflow: -moz-scrollbars-vertical;
+ overflow-y: scroll;
+}
+
+*,
+*:before,
+*:after
+{
+ box-sizing: inherit;
+}
+
+body
+{
+ margin:0;
+ background: #fafafa;
+}
diff --git a/dist/favicon-16x16.png b/dist/favicon-16x16.png
new file mode 100644
index 00000000000..8b194e617af
Binary files /dev/null and b/dist/favicon-16x16.png differ
diff --git a/dist/favicon-32x32.png b/dist/favicon-32x32.png
new file mode 100644
index 00000000000..249737fe445
Binary files /dev/null and b/dist/favicon-32x32.png differ
diff --git a/dist/index.css b/dist/index.css
new file mode 100644
index 00000000000..f2376fdaa84
--- /dev/null
+++ b/dist/index.css
@@ -0,0 +1,16 @@
+html {
+ box-sizing: border-box;
+ overflow: -moz-scrollbars-vertical;
+ overflow-y: scroll;
+}
+
+*,
+*:before,
+*:after {
+ box-sizing: inherit;
+}
+
+body {
+ margin: 0;
+ background: #fafafa;
+}
diff --git a/dist/index.html b/dist/index.html
index 8ae6aeef074..84ae62d3dad 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -1,93 +1,19 @@
-
-
- Swagger UI
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Swagger UI
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dist/oauth2-redirect.html b/dist/oauth2-redirect.html
new file mode 100644
index 00000000000..56409171811
--- /dev/null
+++ b/dist/oauth2-redirect.html
@@ -0,0 +1,79 @@
+
+
+
+ Swagger UI: OAuth2 Redirect
+
+
+
+
+
diff --git a/dist/swagger-initializer.js b/dist/swagger-initializer.js
new file mode 100644
index 00000000000..8ea0ea3afc3
--- /dev/null
+++ b/dist/swagger-initializer.js
@@ -0,0 +1,20 @@
+window.onload = function() {
+ //
+
+ // the following lines will be replaced by docker/configurator, when it runs in a docker-container
+ window.ui = SwaggerUIBundle({
+ url: "https://petstore.swagger.io/v2/swagger.json",
+ dom_id: '#swagger-ui',
+ deepLinking: true,
+ presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIStandalonePreset
+ ],
+ plugins: [
+ SwaggerUIBundle.plugins.DownloadUrl
+ ],
+ layout: "StandaloneLayout"
+ });
+
+ //
+};
diff --git a/dist/swagger-ui-bundle.js b/dist/swagger-ui-bundle.js
index c9fac596831..a0801324592 100644
--- a/dist/swagger-ui-bundle.js
+++ b/dist/swagger-ui-bundle.js
@@ -1,105 +1,2 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){n(1),e.exports=n(298)},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(2),n(293),n(295),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(3),n(52),n(53),n(54),n(55),n(57),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(70),n(72),n(74),n(76),n(79),n(80),n(81),n(85),n(87),n(89),n(92),n(93),n(94),n(95),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(105),n(106),n(107),n(109),n(110),n(111),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(131),n(132),n(136),n(137),n(138),n(139),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(159),n(160),n(166),n(167),n(169),n(170),n(171),n(175),n(176),n(177),n(178),n(179),n(181),n(182),n(183),n(184),n(187),n(189),n(190),n(191),n(193),n(195),n(197),n(198),n(199),n(201),n(202),n(203),n(204),n(211),n(214),n(215),n(217),n(218),n(221),n(222),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(244),n(245),n(246),n(247),n(248),n(249),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(260),n(261),n(263),n(264),n(265),n(266),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(291),n(292),e.exports=n(9)},[1328,4,5,6,8,18,22,7,23,24,19,25,26,27,29,42,45,12,32,16,17,46,49,51,11,30,50,44,43,28,10],function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},[1329,7],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(4),i=n(9),o=n(10),a=n(18),s=n(20),u="prototype",c=function(e,t,n){var l,p,f,h,d=e&c.F,m=e&c.G,v=e&c.S,y=e&c.P,g=e&c.B,_=m?r:v?r[t]||(r[t]={}):(r[t]||{})[u],b=m?i:i[t]||(i[t]={}),x=b[u]||(b[u]={});m&&(n=t);for(l in n)p=!d&&_&&void 0!==_[l],f=(p?_:n)[l],h=g&&p?s(f,r):y&&"function"==typeof f?s(Function.call,f):f,_&&a(_,l,f,e&c.U),b[l]!=f&&o(b,l,h),y&&x[l]!=f&&(x[l]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},[1330,11,17,6],[1331,12,14,16,6],[1332,13],function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},[1333,6,7,15],[1334,13,4],[1335,13],function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(4),i=n(10),o=n(5),a=n(19)("src"),s="toString",u=Function[s],c=(""+u).split(s);n(9).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},[1336,21],function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},[1337,19,13,5,11,7],[1338,4],[1339,11,5,25],[1340,23,19,4],[1341,25],[1342,4,9,28,26,11],function(e,t){e.exports=!1},[1343,30,32],[1344,31,41],[1345,5,32,36,40],[1346,33,35],[1347,34],function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},[1348,32,37,39],[1349,38],function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},[1350,38],[1351,23,19],function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},[1352,30,43,44],function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},[1353,34],[1354,12,47,41,40,15,48],[1355,11,12,30,6],[1356,4],[1357,32,50],[1358,31,41],[1359,44,17,32,16,5,14,6],[1360,8,46],[1361,8,6,11],function(e,t,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperties:n(47)})},function(e,t,n){var r=n(32),i=n(51).f;n(56)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},[1362,8,9,7],function(e,t,n){var r=n(58),i=n(59);n(56)("getPrototypeOf",function(){return function(e){return i(r(e))}})},[1363,35],[1364,5,58,40],[1365,58,30,56],function(e,t,n){n(56)("getOwnPropertyNames",function(){return n(49).f})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13);n(56)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},[1366,8,69],[1367,30,43,44,58,33,7],function(e,t,n){var r=n(8);r(r.S,"Object",{is:n(71)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(8);r(r.S,"Object",{setPrototypeOf:n(73).set})},function(e,t,n){var r=n(13),i=n(12),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(20)(Function.call,n(51).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";var r=n(75),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},[1368,34,25],function(e,t,n){var r=n(8);r(r.P,"Function",{bind:n(77)})},function(e,t,n){"use strict";var r=n(21),i=n(13),o=n(78),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(8),i=n(35),o=n(7),a=n(84),s="["+a+"]",u=" ",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),p=function(e,t,n){var i={},s=o(function(){return!!a[e]()||u[e]()!=u}),c=i[e]=s?t(f):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};e.exports=p},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){var r=n(8),i=n(86);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(4).parseFloat,i=n(83).trim;e.exports=1/r(n(84)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(34),a=n(88),s=n(16),u=n(7),c=n(50).f,l=n(51).f,p=n(11).f,f=n(83).trim,h="Number",d=r[h],m=d,v=d.prototype,y=o(n(46)(v))==h,g="trim"in String.prototype,_=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():f(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),c=0,l=u.length;ci)return NaN;return parseInt(u,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(y?u(function(){v.valueOf.call(n)}):o(n)!=h)?a(new m(_(t)),n,d):_(t)};for(var b,x=n(6)?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;x.length>w;w++)i(m,b=x[w])&&!i(d,b)&&p(d,b,l(m,b));d.prototype=v,v.constructor=d,n(18)(r,h,d)}},function(e,t,n){var r=n(13),i=n(73).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(8),i=n(38),o=n(90),a=n(91),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=u(r/1e7)},h=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=u(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call(p,7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2===1?m(e,t-1,n*e):m(e*e,t/2,n)},v=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(7)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,u=o(this,l),c=i(e),y="",g=p;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(y="-",u=-u),u>1e-21)if(t=v(u*m(2,69,1))-69,n=t<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=t-1;r>=23;)h(1<<23),r-=23;h(1<0?(s=g.length,g=y+(s<=c?"0."+a.call(p,c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c))):g=y+g,g}})},function(e,t,n){var r=n(34);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(38),i=n(35);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(8),i=n(7),o=n(90),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(8),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{isInteger:n(96)})},function(e,t,n){var r=n(13),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(8);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(8),i=n(96),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(8);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(8);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(8),i=n(86);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(8),i=n(82);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(8),i=n(104),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(8),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(8),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(8),i=n(108);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(8);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(8),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(8),i=n(112);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(8),i=n(108),o=Math.pow,a=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126),l=function(e){return e+1/a-1/a};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),o=i(e);return ru||n!=n?o*(1/0):o*n)}})},function(e,t,n){var r=n(8),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(e,t,n){var r=n(8),i=Math.imul;r(r.S+r.F*n(7)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log1p:n(104)})},function(e,t,n){var r=n(8);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(8);r(r.S,"Math",{sign:n(108)})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S+r.F*n(7)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(8);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(8),i=n(39),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(8),i=n(32),o=n(37);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),c=String(e);return s?s.call(t,c,u):t.slice(u-c.length,u)===c}})},function(e,t,n){var r=n(134),i=n(35);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(13),i=n(34),o=n(25)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(25)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var r=n(8),i=n(133),o="includes";r(r.P+r.F*n(135)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(8);r(r.P,"String",{repeat:n(91)})},function(e,t,n){"use strict";var r=n(8),i=n(37),o=n(133),a="startsWith",s=""[a];r(r.P+r.F*n(135)(a),"String",{startsWith:function(e){var t=o(this,e,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(140)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){var r=n(8),i=n(7),o=n(35),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";n(140)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(140)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(140)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(140)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(140)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(140)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(140)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(140)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(140)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(140)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(140)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(140)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(8);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16);r(r.P+r.F*n(7)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(8),i=n(7),o=Date.prototype.getTime,a=function(e){return e>9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r[o],s=r.getTime;new Date(NaN)+""!=i&&n(18)(r,o,function(){var e=s.call(this);return e===e?a.call(this):i})},function(e,t,n){var r=n(25)("toPrimitive"),i=Date.prototype;r in i||n(10)(i,r,n(158))},function(e,t,n){"use strict";var r=n(12),i=n(16),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},function(e,t,n){var r=n(8);r(r.S,"Array",{isArray:n(45)})},[1373,20,8,58,161,162,37,163,164,165],[1374,12],[1375,129,25],[1376,11,17],[1377,75,25,129,9],[1378,25],function(e,t,n){"use strict";var r=n(8),i=n(163);r(r.S+r.F*n(7)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=[].join;r(r.P+r.F*(n(33)!=Object||!n(168)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(7);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(8),i=n(48),o=n(34),a=n(39),s=n(37),u=[].slice;r(r.P+r.F*n(7)(function(){i&&u.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=a(e,n),c=a(t,n),l=s(c-i),p=Array(l),f=0;f=0:p>f;f+=h)f in l&&(s=t(s,l[f],f,c));return s}},function(e,t,n){"use strict";var r=n(8),i=n(180);r(r.P+r.F*!n(168)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(168)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=n(38),a=n(37),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(168)(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(8);r(r.P,"Array",{copyWithin:n(185)}),n(186)("copyWithin")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),u=i(t,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:i(c,a))-u,a-s),p=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=p,u+=p;return n}},function(e,t,n){var r=n(25)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(8);r(r.P,"Array",{fill:n(188)}),n(186)("fill")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(8),i=n(172)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){"use strict";var r=n(8),i=n(172)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){n(192)("Array")},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(6),a=n(25)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},[1382,186,194,129,32,128],function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(4),i=n(88),o=n(11).f,a=n(50).f,s=n(134),u=n(196),c=r.RegExp,l=c,p=c.prototype,f=/a/g,h=/a/g,d=new c(f)!==f;if(n(6)&&(!d||n(7)(function(){return h[n(25)("match")]=!1,c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")}))){c=function(e,t){var n=this instanceof c,r=s(e),o=void 0===t;return!n&&r&&e.constructor===c&&o?e:i(d?new l(r&&!o?e.source:e,t):l((r=e instanceof c)?e.source:e,r&&o?u.call(e):t),n?this:p,c)};for(var m=(function(e){e in c||o(c,e,{configurable:!0,get:function(){return l[e]},set:function(t){l[e]=t}})}),v=a(l),y=0;v.length>y;)m(v[y++]);p.constructor=c,c.prototype=p,n(18)(r,"RegExp",c)}n(192)("RegExp")},function(e,t,n){"use strict";var r=n(12);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(198);var r=n(12),i=n(196),o=n(6),a="toString",s=/./[a],u=function(e){n(18)(RegExp.prototype,a,e,!0)};n(7)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(e,t,n){n(6)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(196)})},function(e,t,n){n(200)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){"use strict";var r=n(10),i=n(18),o=n(7),a=n(35),s=n(25);e.exports=function(e,t,n){var u=s(e),c=n(a,u,""[e]),l=c[0],p=c[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,l),r(RegExp.prototype,u,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){n(200)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(e,t,n){n(200)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(200)("split",2,function(e,t,r){"use strict";var i=n(134),o=r,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,s,p,f,h,d=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,y=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,m+"g");for(l||(r=new RegExp("^"+g.source+"$(?!\\s)",m));(s=g.exec(n))&&(p=s.index+s[0][u],!(p>v&&(d.push(n.slice(v,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(h=1;h1&&s.index=y)));)g[c]===s.index&&g[c]++;return v===n[u]?!f&&g.test("")||d.push(""):d.push(n.slice(v)),d[u]>y?d.slice(0,y):d}}else"0"[s](void 0,0)[u]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},[1383,28,4,20,75,8,13,21,205,206,207,208,209,25,210,24,192,9,165],function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},[1384,20,161,162,12,37,164],[1385,12,21,25],[1386,20,78,48,15,4,34],[1387,4,208,34],function(e,t,n){var r=n(18);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(11).f,i=n(46),o=n(210),a=n(20),s=n(205),u=n(35),c=n(206),l=n(128),p=n(194),f=n(192),h=n(6),d=n(22).fastKey,m=h?"_s":"size",v=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var p=e(function(e,r){s(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&c(r,n,e[l],e)});return o(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,n=v(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[m]--}return!!n},forEach:function(e){s(this,p,"forEach");for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!v(this,e)}}),h&&r(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,n){var r,i,o=v(e,t);return o?o.v=n:(e._l=o={i:i=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),
-r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:v,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(4),i=n(8),o=n(18),a=n(210),s=n(22),u=n(206),c=n(205),l=n(13),p=n(7),f=n(165),h=n(24),d=n(88);e.exports=function(e,t,n,m,v,y){var g=r[e],_=g,b=v?"set":"add",x=_&&_.prototype,w={},k=function(e){var t=x[e];o(x,e,"delete"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof _&&(y||x.forEach&&!p(function(){(new _).entries().next()}))){var S=new _,E=S[b](y?{}:-0,1)!=S,C=p(function(){S.has(1)}),A=f(function(e){new _(e)}),O=!y&&p(function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)});A||(_=t(function(t,n){c(t,_,e);var r=d(new g,t,_);return void 0!=n&&u(n,v,r[b],r),r}),_.prototype=x,x.constructor=_),(C||O)&&(k("delete"),k("has"),v&&k("get")),(O||E)&&k(b),y&&x.clear&&delete x.clear}else _=m.getConstructor(t,e,v,b),a(_.prototype,n),s.NEED=!0;return h(_,e),w[e]=_,i(i.G+i.W+i.F*(_!=g),w),y||m.setStrong(_,e,v),_}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},[1388,172,18,22,69,216,13,213],[1389,210,22,12,13,205,206,172,5],function(e,t,n){"use strict";var r=n(216);n(213)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(8),i=n(219),o=n(220),a=n(12),s=n(39),u=n(37),c=n(13),l=n(4).ArrayBuffer,p=n(207),f=o.ArrayBuffer,h=o.DataView,d=i.ABV&&l.isView,m=f.prototype.slice,v=i.VIEW,y="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,y,{isView:function(e){return d&&d(e)||c(e)&&v in e}}),r(r.P+r.U+r.F*n(7)(function(){return!new f(2).slice(1,void 0).byteLength}),y,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(p(this,f))(u(i-r)),c=new h(this),l=new h(o),d=0;r>1,l=23===t?T(2,-24)-T(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=O(e),e!=e||e===C?(i=e!=e?1:0,r=u):(r=M(D(e)/P),e*(o=T(2,-r))<1&&(r--,o*=2),e+=r+c>=1?l/o:l*T(2,1-c),e*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*T(2,t),r+=c):(i=e*T(2,c-1)*T(2,t),r=0));t>=8;a[p++]=255&i,i/=256,t-=8);for(r=r<0;a[p++]=255&r,r/=256,s-=8);return a[--p]|=128*f,a},L=function(e,t,n){var r,i=8*n-t-1,o=(1<>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;l=256*l+e[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:c?-C:C;r+=T(2,t),l-=a}return(c?-1:1)*r*T(2,l-t)},q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},U=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},V=function(e){return z(e,52,8)},H=function(e){return z(e,23,4)},J=function(e,t,n){d(e[_],t,{get:function(){return this[n]}})},G=function(e,t,n,r){var i=+n,o=p(i);if(i!=o||o<0||o+t>e[N])throw E(x);var a=e[F]._b,s=o+e[B],u=a.slice(s,s+t);return r?u:u.reverse()},X=function(e,t,n,r,i,o){var a=+n,s=p(a);if(a!=s||s<0||s+t>e[N])throw E(x);for(var u=e[F]._b,c=s+e[B],l=r(+i),f=0;fee;)($=Q[ee++])in w||s(w,$,A[$]);o||(Z.constructor=w)}var te=new k(new w(2)),ne=k[_].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(k[_],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else w=function(e){var t=Y(this,e);this._b=m.call(Array(t),0),this[N]=t},k=function(e,t,n){l(this,k,g),l(e,w,g);var r=e[N],i=p(t);if(i<0||i>r)throw E("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw E(b);this[F]=e,this[B]=i,this[N]=n},i&&(J(w,I,"_l"),J(k,j,"_b"),J(k,I,"_l"),J(k,R,"_o")),u(k[_],{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return q(G(this,4,e,arguments[1]))},getUint32:function(e){return q(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){X(this,1,e,U,t)},setUint8:function(e,t){X(this,1,e,U,t)},setInt16:function(e,t){X(this,2,e,W,t,arguments[2])},setUint16:function(e,t){X(this,2,e,W,t,arguments[2])},setInt32:function(e,t){X(this,4,e,K,t,arguments[2])},setUint32:function(e,t){X(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){X(this,4,e,H,t,arguments[2])},setFloat64:function(e,t){X(this,8,e,V,t,arguments[2])}});v(w,y),v(k,g),s(k[_],a.VIEW,!0),t[y]=w,t[g]=k},function(e,t,n){var r=n(8);r(r.G+r.W+r.F*!n(219).ABV,{DataView:n(220).DataView})},function(e,t,n){n(223)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";if(n(6)){var r=n(28),i=n(4),o=n(7),a=n(8),s=n(219),u=n(220),c=n(20),l=n(205),p=n(17),f=n(10),h=n(210),d=n(38),m=n(37),v=n(39),y=n(16),g=n(5),_=n(71),b=n(75),x=n(13),w=n(58),k=n(162),S=n(46),E=n(59),C=n(50).f,A=n(164),O=n(19),T=n(25),M=n(172),D=n(36),P=n(207),j=n(193),I=n(129),R=n(165),F=n(192),N=n(188),B=n(185),z=n(11),L=n(51),q=z.f,U=L.f,W=i.RangeError,K=i.TypeError,V=i.Uint8Array,H="ArrayBuffer",J="Shared"+H,G="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],$=u.ArrayBuffer,Z=u.DataView,Q=M(0),ee=M(2),te=M(3),ne=M(4),re=M(5),ie=M(6),oe=D(!0),ae=D(!1),se=j.values,ue=j.keys,ce=j.entries,le=Y.lastIndexOf,pe=Y.reduce,fe=Y.reduceRight,he=Y.join,de=Y.sort,me=Y.slice,ve=Y.toString,ye=Y.toLocaleString,ge=T("iterator"),_e=T("toStringTag"),be=O("typed_constructor"),xe=O("def_constructor"),we=s.CONSTR,ke=s.TYPED,Se=s.VIEW,Ee="Wrong length!",Ce=M(1,function(e,t){return Pe(P(e,e[xe]),t)}),Ae=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Oe=!!V&&!!V[X].set&&o(function(){new V(1).set({})}),Te=function(e,t){if(void 0===e)throw K(Ee);var n=+e,r=m(e);if(t&&!_(n,r))throw W(Ee);return r},Me=function(e,t){var n=d(e);if(n<0||n%t)throw W("Wrong offset!");return n},De=function(e){if(x(e)&&ke in e)return e;throw K(e+" is not a typed array!")},Pe=function(e,t){if(!(x(e)&&be in e))throw K("It is not a typed array constructor!");return new e(t)},je=function(e,t){return Ie(P(e,e[xe]),t)},Ie=function(e,t){for(var n=0,r=t.length,i=Pe(e,r);r>n;)i[n]=t[n++];return i},Re=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},Fe=function(e){var t,n,r,i,o,a,s=w(e),u=arguments.length,l=u>1?arguments[1]:void 0,p=void 0!==l,f=A(s);if(void 0!=f&&!k(f)){for(a=f.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(p&&u>2&&(l=c(l,arguments[2],2)),t=0,n=m(s.length),i=Pe(this,n);n>t;t++)i[t]=p?l(s[t],t):s[t];return i},Ne=function(){for(var e=0,t=arguments.length,n=Pe(this,t);t>e;)n[e]=arguments[e++];return n},Be=!!V&&o(function(){ye.call(new V(1))}),ze=function(){return ye.apply(Be?me.call(De(this)):De(this),arguments)},Le={copyWithin:function(e,t){return B.call(De(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(De(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return N.apply(De(this),arguments)},filter:function(e){return je(this,ee(De(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(De(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(De(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(De(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(De(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(De(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return he.apply(De(this),arguments)},lastIndexOf:function(e){return le.apply(De(this),arguments)},map:function(e){return Ce(De(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(De(this),arguments)},reduceRight:function(e){return fe.apply(De(this),arguments)},reverse:function(){for(var e,t=this,n=De(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return de.call(De(this),e)},subarray:function(e,t){var n=De(this),r=n.length,i=v(e,r);return new(P(n,n[xe]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:v(t,r))-i))}},qe=function(e,t){return je(this,me.call(De(this),e,t))},Ue=function(e){De(this);var t=Me(arguments[1],1),n=this.length,r=w(e),i=m(r.length),o=0;if(i+t>n)throw W(Ee);for(;o255?255:255&r),i.v[d](n*t+i.o,r,Ae)},T=function(e,t){q(e,t,{get:function(){return A(this,t)},set:function(e){return O(this,t,e)},enumerable:!0})};_?(v=n(function(e,n,r,i){l(e,v,c,"_d");var o,a,s,u,p=0,h=0;if(x(n)){if(!(n instanceof $||(u=b(n))==H||u==J))return ke in n?Ie(v,n):Fe.call(v,n);o=n,h=Me(r,t);var d=n.byteLength;if(void 0===i){if(d%t)throw W(Ee);if(a=d-h,a<0)throw W(Ee)}else if(a=m(i)*t,a+h>d)throw W(Ee);s=a/t}else s=Te(n,!0),a=s*t,o=new $(a);for(f(e,"_d",{b:o,o:h,l:a,e:s,v:new Z(o)});p=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){function r(e,t){var n,s,l=arguments.length<3?e:arguments[2];return c(e)===l?e[t]:(n=i.f(e,t))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=o(e))?r(s,t,l):void 0}var i=n(51),o=n(59),a=n(5),s=n(8),u=n(13),c=n(12);s(s.S,"Reflect",{get:r})},function(e,t,n){var r=n(51),i=n(8),o=n(12);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(8),i=n(59),o=n(12);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(8),i=n(12),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{ownKeys:n(243)})},function(e,t,n){var r=n(50),i=n(43),o=n(12),a=n(4).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(8),i=n(12),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},function(e,t,n){function r(e,t,n){var u,f,h=arguments.length<4?e:arguments[3],d=o.f(l(e),t);if(!d){if(p(f=a(e)))return r(f,t,n,h);d=c(0)}return s(d,"value")?!(d.writable===!1||!p(h))&&(u=o.f(h,t)||c(0),u.value=n,i.f(h,t,u),!0):void 0!==d.set&&(d.set.call(h,n),!0)}var i=n(11),o=n(51),a=n(59),s=n(5),u=n(8),c=n(17),l=n(12),p=n(13);u(u.S,"Reflect",{set:r})},function(e,t,n){var r=n(8),i=n(73);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)("includes")},function(e,t,n){"use strict";var r=n(8),i=n(127)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(37),i=n(91),o=n(35);e.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,c=void 0===n?" ":String(n),l=r(t);if(l<=u||""==c)return s;var p=l-u,f=i.call(c,Math.ceil(p/c.length));return f.length>p&&(f=f.slice(0,p)),a?f+s:s+f}},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(83)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(83)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(8),i=n(35),o=n(37),a=n(134),s=n(196),u=RegExp.prototype,c=function(e,t){this._r=e,this._s=t};n(130)(c,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(e.lastIndex),new c(r,t)}})},[1390,27],[1391,27],function(e,t,n){var r=n(8),i=n(243),o=n(32),a=n(51),s=n(163);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=o(e),r=a.f,u=i(n),c={},l=0;u.length>l;)s(c,t=u[l++],r(n,t));return c}})},function(e,t,n){var r=n(8),i=n(259)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(30),i=n(32),o=n(44).f;e.exports=function(e){return function(t){for(var n,a=i(t),s=r(a),u=s.length,c=0,l=[];u>c;)o.call(a,n=s[c++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){var r=n(8),i=n(259)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){e.exports=n(28)||!n(7)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(4)[e]})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.get;while(n=a(n))}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.set;while(n=a(n))}})},function(e,t,n){var r=n(8);r(r.P+r.R,"Map",{toJSON:n(267)("Map")})},function(e,t,n){var r=n(75),i=n(268);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(206);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(8);r(r.P+r.R,"Set",{toJSON:n(267)("Set")})},function(e,t,n){var r=n(8);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(8),i=n(34);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>16,u=i>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>16)+((o*u>>>0)+(c&n)>>16)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>>16,u=i>>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>>16)+((o*u>>>0)+(c&n)>>>16)}})},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,i(n),o(r))}})},function(e,t,n){var r=n(211),i=n(8),o=n(23)("metadata"),a=o.store||(o.store=new(n(215))),s=function(e,t,n){var i=a.get(e);if(!i){if(!n)return;a.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},u=function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},c=function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},l=function(e,t,n,r){s(n,r,!0).set(e,t)},p=function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},h=function(e){i(i.S,"Reflect",e)};e.exports={store:a,map:s,has:u,get:c,set:l,keys:p,key:f,exp:h}},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.get,u=r.key,c=function(e,t,n){var r=a(e,t,n);if(r)return s(e,t,n);var i=o(t);return null!==i?c(e,i,n):void 0};r.exp({getMetadata:function(e,t){return c(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(214),i=n(268),o=n(277),a=n(12),s=n(59),u=o.keys,c=o.key,l=function(e,t){var n=u(e,t),o=s(e);if(null===o)return n;var a=l(o,t);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(e){return l(a(e),arguments.length<2?void 0:c(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:a(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.key,u=function(e,t,n){var r=a(e,t,n);if(r)return!0;var i=o(t);return null!==i&&u(e,i,n)};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(21),a=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?i:o)(n),a(r))}}})},function(e,t,n){var r=n(8),i=n(209)(),o=n(4).process,a="process"==n(34)(o);r(r.G,{asap:function(e){var t=a&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(8),i=n(4),o=n(9),a=n(209)(),s=n(25)("observable"),u=n(21),c=n(12),l=n(205),p=n(210),f=n(10),h=n(206),d=h.RETURN,m=function(e){return null==e?void 0:u(e)},v=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},g=function(e){y(e)||(e._o=void 0,v(e))},_=function(e,t){c(e),this._c=void 0,this._o=e,e=new b(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}y(this)&&v(this)};_.prototype=p({},{unsubscribe:function(){g(this)}});var b=function(e){this._s=e};b.prototype=p({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=m(n.next);if(r)return r.call(n,e)}catch(e){try{g(t)}finally{throw e}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=m(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{v(t)}finally{throw e}}return v(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=m(n.complete);e=r?r.call(n,e):void 0}catch(e){try{v(t)}finally{throw e}}return v(t),e}}});var x=function(e){l(this,x,"Observable","_f")._f=u(e)};p(x.prototype,{subscribe:function(e){return new _(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n})})}}),p(x,{from:function(e){var t="function"==typeof this?this:x,n=m(c(e)[s]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return a(function(){if(!n){try{if(h(e,!1,function(e){if(t.next(e),n)return d})===d)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);ea;)(n[a]=arguments[a++])===s&&(u=!0);return function(){var r,o=this,a=arguments.length,c=0,l=0;if(!u&&!a)return i(e,n,o);if(r=n.slice(),u)for(;t>c;c++)r[c]===s&&(r[c]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return i(e,r,o)}}},function(e,t,n){e.exports=n(4)},function(e,t,n){var r=n(8),i=n(208);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(193),i=n(18),o=n(4),a=n(10),s=n(129),u=n(25),c=u("iterator"),l=u("toStringTag"),p=s.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d,m=f[h],v=o[m],y=v&&v.prototype;if(y){y[c]||a(y,c,p),y[l]||a(y,l,m),s[m]=p;for(d in r)y[d]||i(y,d,r[d],!0)}}},function(e,t,n){(function(t,n){!function(t){"use strict";function r(e,t,n,r){var i=t&&t.prototype instanceof o?t:o,a=Object.create(i.prototype),s=new d(r||[]);return a._invoke=l(e,n,s),a}function i(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function s(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,r,o,a){var s=i(e[n],e,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&_.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},a)}a(s.arg)}function r(e,n){function r(){return new Promise(function(r,i){t(e,n,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof n&&n.domain&&(t=n.domain.bind(t));var o;this._invoke=r}function l(e,t,n){var r=E;return function(o,a){if(r===A)throw new Error("Generator is already running");if(r===O){if("throw"===o)throw a;return v()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=p(s,n);if(u){if(u===T)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===E)throw r=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=A;var c=i(e,t,n);if("normal"===c.type){if(r=n.done?O:C,c.arg===T)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=O,n.method="throw",n.arg=c.arg)}}}function p(e,t){var n=e.iterator[t.method];if(n===y){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=y,p(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var r=i(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,T;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=y),t.delegate=null,T):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function h(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function m(e){if(e){var t=e[x];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=_.call(i,"catchLoc"),s=_.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){
-var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&_.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),h(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;h(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:m(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=y),T}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),n(294))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&h&&(m=!1,h.length?d=h.concat(d):v=-1,d.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=d.length;t;){for(h=d,d=[];++v1)for(var n=1;n
- * @license MIT
- *
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2015 Viacheslav Lotsmanov
- *
- * 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.
- */
-"use strict";function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function i(e){var t=[];return e.forEach(function(e,a){"object"==typeof e&&null!==e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}var o=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach(function(s){"object"!=typeof s||Array.isArray(s)||Object.keys(s).forEach(function(u){return t=a[u],e=s[u],e===a?void 0:"object"!=typeof e||null===e?void(a[u]=e):Array.isArray(e)?void(a[u]=i(e)):n(e)?void(a[u]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[u]=o({},e)):void(a[u]=o(t,e))})}),a}}).call(t,n(300).Buffer)},function(e,t,n){(function(e){/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh
- * @license MIT
- */
-"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),a.alloc(+e)}function y(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:x(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):x(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var p=!0,f=0;fi&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,p;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128===(192&u)&&(p=(31&o)<<6|63&u,p>127&&(a=p));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(p=(15&o)<<12|(63&u)<<6|63&c,p>2047&&(p<55296||p>57343)&&(a=p));break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(p=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,p>65535&&p<1114112&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return M(r)}function M(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function z(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,i){return i||z(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||z(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function U(e){if(e=W(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return $.toByteArray(U(e))}function X(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var $=n(301),Z=n(302),Q=n(303);t.Buffer=a,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return c(null,e,t,n)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,u=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;F(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,a,s,u=e.length;a=n(e),s=new l(3*u/4-a),i=a>0?u-4:u;var p=0;for(t=0,r=0;t>16&255,s[p++]=o>>8&255,s[p++]=255&o;return 2===a?(o=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[p++]=255&o):1===a&&(o=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[p++]=o>>8&255,s[p++]=255&o),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,n){for(var r,i=[],a=t;al?l:c+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=p.length;f>1,l=-7,p=n?i-1:0,f=n?-1:1,h=e[t+p];for(p+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+p],p+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?f/u:f*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,c-=8);e[n+h-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){var r=[(0,A.systemThunkMiddleware)(n)],i=C.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||d.compose;return(0,d.createStore)(e,t,i(d.applyMiddleware.apply(void 0,r)))}function s(e,t){return(0,A.isObject)(e)&&!(0,A.isArray)(e)?e:(0,A.isFunc)(e)?s(e(t),t):(0,A.isArray)(e)?e.map(function(e){return s(e,t)}).reduce(u,{}):{}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,A.isObject)(e))return{};if(!(0,A.isObject)(t))return e;var n=e.statePlugins;if((0,A.isObject)(n))for(var r in n){var i=n[r];if((0,A.isObject)(i)&&(0,A.isObject)(i.wrapActions)){var o=i.wrapActions;for(var a in o){var s=o[a];Array.isArray(s)||(s=[s],o[a]=s),t&&t.statePlugins&&t.statePlugins[r]&&t.statePlugins[r].wrapActions&&t.statePlugins[r].wrapActions[a]&&(t.statePlugins[r].wrapActions[a]=o[a].concat(t.statePlugins[r].wrapActions[a]))}}}return(0,g.default)(e,t)}function c(e){var t=(0,A.objMap)(e,function(e){return e.reducers});return l(t)}function l(e){var t=Object.keys(e).reduce(function(t,n){return t[n]=p(e[n]),t},{});return Object.keys(t).length?(0,_.combineReducers)(t):O}function p(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new m.Map,n=arguments[1];if(!e)return t;var r=e[n.type];return r?r(t,n):t}}function f(e,t,n){var r=a(e,t,n);return r}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),(0,g.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=f(O,(0,m.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return h(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=s(e,this.getSystem());u(this.system,n),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,n=this.getStore().getState;this.boundSystem=(0,x.default)({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(n,this.getSystem),this.getStateThunks(n),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return(0,x.default)({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:v.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(c(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,A.objReduce)(this.system.statePlugins,function(n,r){var o=n[e];if(o)return i({},r+t,o)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,A.objMap)(e,function(e){return(0,A.objReduce)(e,function(e,t){if((0,A.isFn)(e))return i({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,n=this.getBoundActions(e);return(0,A.objMap)(n,function(e,n){var r=t.system.statePlugins[n.slice(0,-7)].wrapActions;return r?(0,A.objMap)(e,function(e,n){var i=r[n];return i?(Array.isArray(i)||(i=[i]),i.reduce(function(e,n){var r=function(){return n(e,t.getSystem()).apply(void 0,arguments)};if(!(0,A.isFn)(r))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return r},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,n){return t[n]=e.get(n),t},{})}},{key:"getStateThunks",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,n){return t[n]=function(){return e().get(n)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,A.objMap)(this.getSelectors(),function(n,r){var i=[r.slice(0,-9)],o=function(){return e().getIn(i)};return(0,A.objMap)(n,function(e){return function(){for(var n=arguments.length,r=Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?d(e)+t:t}function v(){return!0}function y(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function g(e,t){return b(e,t,0)}function _(e,t){return b(e,t,t)}function b(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function x(e){this.next=e}function w(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function k(){return{value:void 0,done:!0}}function S(e){return!!A(e)}function E(e){return e&&"function"==typeof e.next}function C(e){var t=A(e);return t&&t.call(e)}function A(e){var t=e&&(kn&&e[kn]||e[Sn]);if("function"==typeof t)return t}function O(e){return e&&"number"==typeof e.length}function T(e){return null===e||void 0===e?B():o(e)?e.toSeq():q(e)}function M(e){return null===e||void 0===e?B().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():z(e)}function D(e){return null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():L(e)}function P(e){return(null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e:L(e)).toSetSeq()}function j(e){this._array=e,this.size=e.length}function I(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function R(e){this._iterable=e,this.size=e.length||e.size}function F(e){this._iterator=e,this._iteratorCache=[]}function N(e){return!(!e||!e[Cn])}function B(){return An||(An=new j([]))}function z(e){var t=Array.isArray(e)?new j(e).fromEntrySeq():E(e)?new F(e).fromEntrySeq():S(e)?new R(e).fromEntrySeq():"object"==typeof e?new I(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function L(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function q(e){var t=U(e)||"object"==typeof e&&new I(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return O(e)?new j(e):E(e)?new F(e):S(e)?new R(e):void 0}function W(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function K(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new x(function(){var e=i[n?o-a:a];return a++>o?k():w(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function V(e,t){return t?H(t,e,"",{"":e}):J(e)}function H(e,t,n,r){return Array.isArray(t)?e.call(r,n,D(t).map(function(n,r){return H(e,n,r,t)})):G(t)?e.call(r,n,M(t).map(function(n,r){return H(e,n,r,t)})):t}function J(e){return Array.isArray(e)?D(e).map(J).toList():G(e)?M(e).map(J).toMap():e}function G(e){return e&&(e.constructor===Object||void 0===e.constructor)}function X(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Y(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&X(i[1],e)&&(n||X(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var l=e;e=t,t=l}var p=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!X(t,e.get(r,yn)):!X(e.get(r,yn),t))return p=!1,!1});return p&&e.size===f}function $(e,t){if(!(this instanceof $))return new $(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(On)return On;On=this}}function Z(e,t){if(!e)throw new Error(t)}function Q(e,t,n){if(!(this instanceof Q))return new Q(e,t,n);if(Z(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function oe(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>Nn?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=Ln[e];return void 0===t&&(t=se(e),zn===Bn&&(zn=0,Ln={}),zn++,Ln[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function le(e){Z(e!==1/0,"Cannot perform this action with an infinite size.")}function pe(e){return null===e||void 0===e?we():fe(e)&&!c(e)?e:we().withMutations(function(t){var r=n(e);le(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function fe(e){return!(!e||!e[qn])}function he(e,t){this.ownerID=e,this.entries=t}function de(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ge(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&be(e._root)}function _e(e,t){return w(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function xe(e,t,n,r){var i=Object.create(Un);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function we(){return Wn||(Wn=xe(0))}function ke(e,t,n){var r,i;if(e._root){var o=l(gn),a=l(_n);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===yn?-1:1:0)}else{if(n===yn)return e;i=1,r=new he(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?xe(i,r):we()}function Se(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===yn?e:(p(s),p(a),new ye(t,r,[i,o]))}function Ee(e){return e.constructor===ye||e.constructor===ve}function Ce(e,t,n,r,i){if(e.keyHash===r)return new ve(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&vn,s=(0===n?r:r>>>n)&vn,u=a===s?[Ce(e,t,n+dn,r,i)]:(o=new ye(t,r,i),a>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new me(e,o+1,a)}function Me(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Fe(e,t,n,r){var i=r?e:h(e);return i[t]=n,i}function Ne(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,c=a-n;return c>mn&&(c=mn),function(){if(i===c)return Yn;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>mn&&(l=mn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(c===l)return Yn;var o=t?--l:c++;s=n(u&&u[o],r-dn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Xe(e,t).set(0,n):Xe(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=l(_n);return t>=$e(e._capacity)?r=He(r,e.__ownerID,0,t,n,o):i=He(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):We(e._origin,e._capacity,e._level,i,r):e}function He(e,t,n,r,i,o){var a=r>>>n&vn,s=e&&a0){var c=e&&e.array[a],l=He(c,t,n-dn,r,i,o);return l===c?e:(u=Je(e,t),u.array[a]=l,u)}return s&&e.array[a]===i?e:(p(o),u=Je(e,t),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Je(e,t){return t&&e&&t===e.ownerID?e:new qe(e?e.array.slice():[],t)}function Ge(e,t){if(t>=$e(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&vn],r-=dn;return n}}function Xe(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new f,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new qe(c&&c.array.length?[void 0,c]:[],r),u+=dn,l+=1<=1<p?new qe([],r):d;if(d&&h>p&&adn;y-=dn){var g=p>>>y&vn;v=v.array[g]=Je(v.array[g],r)}v.array[p>>>dn&vn]=d}if(s=h)a-=h,s-=h,u=dn,c=null,m=m&&m.removeBefore(r,0,a);else if(a>i||h